Sync Errors
Several common problems that players experience with HabitRPG are all caused by sync errors. This page explains what syncing is, how sync errors occur, and how to avoid or minimize them. If you don't want to read the whole page, start at How to Minimize Sync Errors. Browser to Server Syncing HabitRPG has a server that stores all the data for all players, and that does most of the work required to keep the site running. However, some of the site's code also runs in the player's browser to provide a rapid response to the player's actions. When the player takes an action (e.g., ticking off a task), the browser immediately calculates the effects of that action (e.g., the experience and gold earned), and it displays those results to the user. It then sends a message to the server describing the action that the user took. The server will receive that message and update its stored data for that player. The server will then send back to the browser a complete copy of the player's stored data so that the browser has the most up-to-date information. This can include recent events that the browser did not previously know about (e.g., skills cast upon the player by party members), so that the browser can display those events to the player. When the browser receives the complete copy of the player's data, it discards its own local, out-of-date copy, and replaces it with the fresh data from the server. Sync Errors Sometimes, when the player takes an action and the browser tries to send that action to the server, the message does not get through and a sync error occurs. The player sees the action take effect in the browser but the server never learns about it, and so the action is never added to the server's stored data. When the player takes another action after that, the browser sends the new action to the server, the server receives that action and sends the complete copy of the player's stored data back to the browser. That data does not include the previous, unsynced action that the server never found out about. As described above, when the browser receives the data from the server, it uses that data exclusively, and so all effects of the unsynced action are reversed (e.g., if the player had gained experience and gold from the unsynced action, then that experience and gold will be removed). This reversal might seem like a bad idea, but it is necessary for the browser to take on all of the stored data from the server, otherwise the server would never be able to tell the browser about events such as skills cast on the player. How to Minimize Sync Errors Sync errors often occur when the player performs several actions in quick succession (e.g., ticking off several Dailies within a few seconds). This overloads the browser, preventing it from sending some or all of the actions to the server. Although errors in gold or experience should be somewhat consistent with the tasks that didn't sync correctly, sync errors can result in odd, inconsistent results. To prevent this, after you have taken an action, notice the thin blue line that appears at the top of the screen. It travels from left to right to indicate the progress of syncing from your browser to the server and back again. When the line has disappeared, syncing is finished, and it is safe to perform another action. (If the blue line does not appear after your action, it is because that particular action does not require syncing.) Often, you can actually successfully perform actions without waiting for syncing to finish, but if you want to be certain of not getting sync errors, you should wait for the blue line to disappear between each action. This is especially important with critical actions such as ticking off Dailies near the end of the day or Resting in the Inn. If you tick off several Dailies rapidly at the same time, it's very likely that some of them won't be synced to the server, and then when your Cron runs, the server will not know that you did those Dailies and so will subtract health for them. If you check in to the Inn and a sync error occurs, you will not actually be Resting in the Inn and will not be protected from damage from your uncompleted Dailies. To test whether a sync error has occurred, click the sync button in the top right hand corner of the window (it looks like a circle made from two curved arrows). That will cause your browser to fetch your stored data from the server. After the sync has completed (i.e., when the thin blue line has disappeared) examine your Dailies, or your Resting in the Inn status, or any other information that is important to you. If you discover that any actions you took were not synced, repeat those actions and then resync to test again. You can also use the User Data Display tool to check for sync errors because it reads your stored data directly from the server. It will tell you which Dailies have not yet been ticked off and whether you are Resting in the Inn ("ZzzZzzzz" will appear in the dashboard if you are). Sync errors can also be caused by unreliable internet connections, so if you are noticing problems with your net connection, be more alert than usual about checking for sync errors. Common Examples of Sync Errors Sync errors can happen with any kind of action in HabitRPG but here are some common examples. Completing most/all Dailies but still losing health and streaks As described above, ticking off several Dailies quickly (e.g., at the end of the day) often causes sync errors. The server never finds out that you ticked them, and so you will loose health overnight and the streaks for those dailies will be reset to zero. You will also cause damage to your party members if you are on a boss quest. Just before you stop using HabitRPG for the day, use the sync button or the User Data Display tool to check that your Dailies really have been marked as completed. To compensate for health lost due to a sync error, use Fix Character Values under Settings to restore your health, and also add one level if you died due to a sync error. You can restore your Dailies' streaks in their Advanced Options. Losing gold or experience or mana for no apparent reason If you tick off a task, your browser will give you experience and gold (and mana for To-Dos) but if a sync error occurred for that task, then the next time the browser syncs with the server, you will lose those rewards and the task will become unticked. You will see notifications with negative values, showing you that the rewards are being removed. You can regain them by finding the unticked task and ticking it off again (although if it was a Habit that was not synced, it can be very hard to identify it). Equipment that you recently bought has disappeared If a sync error occurs when you buy a piece of equipment, then when your browser resyncs with the server, the equipment will disappear from your inventory and will become available for purchase again. You might need to reload your browser or clear your browser's cache before you see it in the Rewards column. The gold that you had spent to buy the equipment should be restored to you automatically but if it is not, you can use Fix Character Values under Settings to restore it. Pets that you hatched or fed into mounts have disappeared If a sync error occurs when you hatch a pet, then when your browser resyncs with the server, the pet will disappear. The egg and hatching potion that you used will be returned to you. You might need to reload your browser or clear your browser's cache before you see them in your inventory. You can then re-hatch the pet. Similarly, if a sync error occurs when you feed a pet to turn it into a mount, then when your browser resyncs with the server, the mount will disappear. The pet and food will be returned to you. You might need to reload your browser or clear your browser's cache before you see them in your inventory. You can then feed the pet again. Skills cast in rapid succession can produce error messages If you cast several skills too quickly, sync errors can occur. This sometimes causes red error notifications to appear, containing messages such as "Please reload. Error No matching document found." Any mana that you spent on unsynced skills will be returned to you. You can cast the skills again, more slowly. Category:Bug Category:Setup Tips Category:Tips and Tricks Category:Content